package com.example.educational.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.educational.entity.ReadPeople;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * @author MySoul
 * @description 针对表【edu_read_people】的数据库操作Mapper
 * @createDate 2023-05-21 08:02:54
 * @Entity com.example.educational.entity.ReadPeople
 */
@Mapper
public interface ReadPeopleMapper extends BaseMapper<ReadPeople> {


    @Update("UPDATE edu_read_people SET total_count = total_count + 1 WHERE user_id =#{user_id} AND task_id =#{task_id}")
    Boolean updateCountByInfo(@Param("user_id") String userId, @Param("task_id") String taskId);
}




